Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

table col width #2358

Merged
merged 5 commits into from
Dec 20, 2024
Merged

table col width #2358

merged 5 commits into from
Dec 20, 2024

Conversation

FredLL-Avaiga
Copy link
Member

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

Handle column width when specified

add a sortable property to table (default True)

Related Tickets & Documents

How to reproduce the issue

import pandas as pd

import taipy.gui.builder as tgb
from taipy.gui import Gui

data = pd.DataFrame(
    {
        "AC": [1, 2, 3],
        "BC": [4, 5, 6],
        "CC": [
            "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque porttitor, ante et dictum rutrum, lacus turpis euismod dui, et suscipit nunc dolor in dui. Curabitur non elit tellus. Praesent sed placerat lorem. Nunc eleifend nisl vitae pretium iaculis. Donec dignissim, nisl a malesuada varius, risus elit tristique nisi, vitae imperdiet tortor dolor in dolor. In leo leo, finibus eget interdum sit amet, tempus maximus nibh. Pellentesque quis laoreet velit. Phasellus ultricies ligula sit amet ligula mollis placerat. Aenean eget iaculis felis. Aliquam vehicula rutrum justo a tincidunt. In hac habitasse platea dictumst. Aliquam volutpat in massa vel sodales.",
            "8",
            "9",
        ],
    }
)

properties_table = {"width[BC]": "50px"}

# style={"taipy-table": {"th:nth-child(2)": {"min-width": "700px"}}}

with tgb.Page() as page:
    # tgb.table(data="{data}", sortable=False, show_all=True)
    tgb.table(data="{data}", width__BC=50, width__CC="", sortable=False, show_all=True)

Gui(page=page).run(title="2286 [🐛 BUG] Applying width to a specific column")

@FredLL-Avaiga FredLL-Avaiga added 🟥 Priority: Critical Must be addressed as soon as possible 🖰 GUI Related to GUI 💥Malfunction Addresses an identified problem. 📝Release Notes Impacts the Release Notes or the Documentation in general labels Dec 19, 2024
@FredLL-Avaiga FredLL-Avaiga self-assigned this Dec 19, 2024
Copy link
Contributor

github-actions bot commented Dec 19, 2024

Coverage report for ./frontend/taipy

Caution

Coverage does not meet threshold
Statements coverage not met for global: expected >=80%, but got 51.87376725838264%

St.
Category Percentage Covered / Total
🔴 Statements 51.87% 263/507
🔴 Branches 21.61% 67/310
🔴 Functions 14.66% 17/116
🔴 Lines 53.19% 242/455

Test suite run success

7 tests passing in 1 suite.

Report generated by 🧪jest coverage report action from cf29653

Copy link
Contributor

Coverage report for ./frontend/taipy-gui

Caution

Coverage does not meet threshold
Branches coverage not met for global: expected >=80%, but got 69.34244235695986%

St.
Category Percentage Covered / Total
🟢 Statements
87.52% (+0.04% 🔼)
3515/4016
🟡 Branches
69.34% (+0.23% 🔼)
2436/3513
🟢 Functions 83.44% 650/779
🟢 Lines
87.98% (+0.04% 🔼)
3256/3701

Test suite run success

717 tests passing in 47 suites.

Report generated by 🧪jest coverage report action from 6e5d024

Copy link
Contributor

github-actions bot commented Dec 19, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
19472 16976 87% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
taipy/gui/_renderers/factory.py 96% 🟢
TOTAL 96% 🟢

updated for commit: cf29653 by action🐍

Copy link
Member

@FabienLelaquais FabienLelaquais left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's discuss this notSortable thing please.

taipy/gui/viselements.json Outdated Show resolved Hide resolved
taipy/gui/viselements.json Outdated Show resolved Hide resolved
taipy/gui/viselements.json Show resolved Hide resolved
Copy link
Member

@FabienLelaquais FabienLelaquais left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think?

taipy/gui/viselements.json Outdated Show resolved Hide resolved
Co-authored-by: Fabien Lelaquais <[email protected]>
Copy link
Member

@FabienLelaquais FabienLelaquais left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@FredLL-Avaiga FredLL-Avaiga merged commit 13d97c5 into develop Dec 20, 2024
133 checks passed
@FredLL-Avaiga FredLL-Avaiga deleted the bug/#2286-table-col-width branch December 20, 2024 10:49
FredLL-Avaiga pushed a commit that referenced this pull request Dec 20, 2024
FredLL-Avaiga added a commit that referenced this pull request Dec 20, 2024
resolves #2358

Co-authored-by: Fred Lefévère-Laoide <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖰 GUI Related to GUI 💥Malfunction Addresses an identified problem. 🟥 Priority: Critical Must be addressed as soon as possible 📝Release Notes Impacts the Release Notes or the Documentation in general
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐛 BUG] Applying width to a specific column in a tgb.table does not work
2 participants